﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BXH.Movie.FrmUsers;
using BXH.Movie.Model;
using System.IO;

namespace BXH.Movie.Forms
{
    public partial class UCCheckMovieInfo : UserControl
    {
        private MovieInfoDto _movieInfo;
        public UCCheckMovieInfo(MovieInfoDto movieInfo)
        {
            InitializeComponent();
            _movieInfo = movieInfo;
        }

        private void UCCheckMovieInfo_Load(object sender, EventArgs e)
        {
            lbTitle.Text = " 片名:" + _movieInfo.Name;
            lbActor.Text = "演员:" + _movieInfo.Actor;
            lbDirect.Text = "导演:" + _movieInfo.Direct;
            lbType.Text = "类型:" + _movieInfo.TypeName;
            lbCountry.Text = "地区:" + _movieInfo.Country;
            lbBrief.Text = _movieInfo.Brief;
            var imagePath = Path.Combine(FrmMain.BasePath, _movieInfo.Image);
            PicLogo.Image = Image.FromFile(imagePath);
        }

        private void CkbBuy_CheckedChanged(object sender, EventArgs e)
        {
           //UCMovieSession uCMovieSession = new UCMovieSession(_movieInfo);//太麻烦不这样处理了
            UCSeatManager seatManager = new UCSeatManager(_movieInfo);
            FrmMain._FrmMain.SetManageOtherShow(seatManager);
        }

        private void PicLogo_Click(object sender, EventArgs e)
        {

        }
    }
}
